/*
 * Lenovo Group
 * Copyright (c) 2015-2016 All Rights Reserved.
 * 
 * Project Name:assign-tracer
 * Create Time: 2016年2月25日 下午1:43:36
 */
package com.lenovo.lmrp.server.assigntracer.facade;

import com.lenovo.lmrp.api.model.view.ChangedTicketVO;

/**
 * Privide simple interface for workflow activity task to handle engineer action for ticket.
 * 
 * After facade, other service, repostory, BO etc. complete business logic
 * 
 * @author wujin
 * @version v1.0
 */
public interface IEngineerActionFacade {
    
    /**
     * Engineer accept or reject assigned ticket.
     * 
     * action should be confirm or reject, if reject should provide reason
     * 
     * Return value is next step start time inverval from now, unit is hour, format follow ISO 8601, 
     * for example, PT10H means 10 hours
     * 
     * @param itsmCode
     * @param changedVO
     * @return next step timeout value, follow ISO 8601 spec.
     */
    public String doConfirm(String itsmCode, ChangedTicketVO changedVO);
    
    /**
     * Engineer make appoint with customer, set contact, visit time and visit address
     * 
     * @param itsmCode
     * @param changedVO
     */
    public String doAppoint(String itsmCode, ChangedTicketVO changedVO);
    
    /**
     * Engineer arrive customer field, begin to resolve issue
     * 
     * @param itsmCode
     * @param changedVO
     */
    public String doVisit(String itsmCode, ChangedTicketVO changedVO);
    
    /**
     * Engineer report solution for issue
     * 
     * @param itsmCode
     * @param changedVO
     */
    public String doResolve(String itsmCode, ChangedTicketVO changedVO);
    
    /**
     * 
     * 
     * @param itsmCode
     * @param changedVO
     */
    public String doEvaluate(String itsmCode, ChangedTicketVO changedVO);
    
    /**
     * Engineer complete ticket
     * 
     * @param itsmCode
     * @param changedVO
     */
    public String doClose(String itsmCode, ChangedTicketVO changedVO);
    
    /**
     * Notify ticket doesn't complete current step as SLA defined
     * 
     * @param step
     * @param itsmCode
     * @param ticketID
     * @param engineerID
     */
    public boolean doTimeoutAlarm(String step, String itsmCode, String ticketID, String engineerID);
}
